class Node {
    constructor(ele) {
        this.element = ele;
        this.next = null;
    }

    /**
     * 设置下一个节点
     */
    setNext(ele) {
        this.next = ele;
    }

    /**
     * 获取节点指向的下一个元素
     */
    getNext() {
        return this.next;
    }

    /**
     * 设置值
     * @param ele
     */
    setValue(ele) {
        this.element = ele;
    }

    /**
     * 获取当前节点值
     * @returns {*}
     */
    getValue() {
        return this.element;
    }

}

module.exports = Node;